
import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'mobx-react';
import { HashRouter as Router, Route, Switch, Redirect } from 'react-router-dom';
import { asyncComponent } from 'react-async-component';
import { Tools,Bubble } from 'weaver-mobile';
import allStore from './stores';

import './style';

const getLabel = Tools.getLabel;
const coms = {
  Home: asyncComponent({
    resolve: () => import('./components/home')
  })
}

class Root extends React.Component {
  render() {
    return (
      <Provider {...allStore}>
        <Router>
          <Switch>
            <Redirect exact path="/" to={{ pathname: '/home' }} />
            <Route name="home" breadcrumbName={getLabel("518463", "消息中心提醒设置")} path='/home' component={coms.Home} />
          </Switch>
        </Router>
      </Provider>
    )
  }
}

Tools.getLocaleLabel('commondasf',() => {
  render(<Root />, document.getElementById('root'));
})
